
    //遍历每个子div块，并为他们增加点击事件
    for (var j = 0; j < length; j++) {
      var id = nodes[j].getAttribute("id");
      var useNum = "#" + id;
      $(useNum).bind("click", function () {
        for_num(useNum, id);
      });
    }
    // 首页
    $("#home").bind("click", function () {
      go_back(1, 0);
      change_add(1, 0);
      currentPage();
    });
    // 尾页
    $("#last").bind("click", function () {
      go_back(real_count, 0);
      change_add(count - real_count + 1, 0);
      currentPage();
    });
    // 点击上一页
    $("#before").bind("click", function () {
      var useBefore = "#" + sign;
      var inner = (o == 0) ? $(useBefore).text() >= count - real_change : $(useBefore).text() > count - real_change + 1;
      if ($(useBefore).text() <= real_change || inner) {
        go_back(0, 2);
        currentPage();
      } else {
        change_add(0, 3);
        currentPage();
      }
    });
    // 点击下一页
    $("#next").bind("click", function () {
      var useNext = "#" + sign;
      if ($(useNext).text() != count) {
        var inner = (o == 0) ? $(useNext).text() >= count - real_change : $(useNext).text() > count - real_change;
        if ($(useNext).text() < real_change || inner) {
          go_back(0, 1);
          currentPage();
        } else {
          change_add(0, 2);
          currentPage();
        }
      }
    });
    $(".l_jump").bind("click", function () {
      let val = $("#inp").val(); //获取输入框的值
      val = parseInt(val);
      if (val >= 1 && val <= count) {
        var inner = (o == 0) ? val >= count - real_change : val > count - real_change;
        if (val <= real_change || inner) //如果是在最前面的一半以前，或者是在最后面的一半以后
        {
          if (val <= real_change) {
            go_back(val, 0);
            change_add(1, 0);
          } else {
            go_back(real_count - (count - val), 0);
            change_add(count - real_count + 1, 0);
          }
        } else {
          go_back(real_change, 0);
          change_add(val - (real_change - 1), 0);
        }
      } else {
        alert("没有这么多页");
      }
      currentPage();
    });